package net.pm.core.service.power;

import java.util.List;

import net.pm.common.service.GenericServicer;
import net.pm.common.toolkit.PMRetcodeGenerator;
import net.pm.core.entities.db.UserPower;

public interface UserPowerServicer extends GenericServicer<UserPower, Long>{
	
	/**
	 * 根据用户id查找权限
	 * @param userId
	 * @return
	 */
	List<String> findUserPowerCodesByUserId(Long userId);
	
	/**
	 * 更新用户权限
	 * @param userId
	 * @param powerIds
	 * @return
	 */
	Long modifyUserPower(Long userId,Integer[] powerIds);
	Long power_modify_success = PMRetcodeGenerator.next();				//更新权限成功
	Long power_modify_failed = PMRetcodeGenerator.next();				//更新权限失败
	
	/**
	 * 删除用户权限
	 * @param userId
	 * @return
	 */
	Long removeUserPower(Long userId);
	Long power_remove_success = PMRetcodeGenerator.next();
	Long power_remove_failed = PMRetcodeGenerator.next();
}
